]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
inputMethod: Do not reset invisible preedit on focus_out
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 29 Oct 2021 14:46:18 +0000 (16:46 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 1 Nov 2021 17:34:57 +0000 (18:34 +0100)
If the preedit is in invisible state, the last preedit string that
was sent around is already null, so there is no need to clear the preedit
in that case.

(Cherry-picked from commit 01775609525b12de752a2f7ebac88baee9b041d3)

js/misc/inputMethod.js

index 71dff84f584747ebd6d1d49e8dcbe0c8f3017b60..8c3cd61aeb8387199866809ebdf1bbf73deb6d02 100644 (file)
@@ -167,7 +167,7 @@ class InputMethod extends Clutter.InputMethod {
         if (this._context)
             this._context.focus_out();
 
-        if (this._preeditStr) {
+        if (this._preeditStr && this._preeditVisible) {
             // Unset any preedit text
             this.set_preedit_text(null, 0, this._preeditCommitMode);
             this._preeditStr = null;